#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    void enterEvent(QEvent *event)override;

    //鼠标离开事件
    void leaveEvent(QEvent *event)override;
    void keyPressEvent(QKeyEvent *ev) override;
    void keyReleaseEvent(QKeyEvent *ev) override;
private:
    Ui::Widget *ui;
};

#endif // WIDGET_H
